package com.gitee.wsl.time.schedule.adapter

//typealias SchedulerController<I, E, S> = BallastViewModel<
//        SchedulerContract.Inputs<I, E, S>,
//        SchedulerContract.Events<I, E, S>,
//        SchedulerContract.State<I, E, S>>
//
//@ExperimentalBallastApi
//public fun <I : Any, E : Any, S : Any> BallastViewModelConfiguration.Builder.withSchedulerController(
//    clock: Clock = Clock.System,
//    scheduleExecutor: CoroutineScheduleExecutor = CoroutineClockScheduleExecutor(clock),
//): BallastViewModelConfiguration.TypedBuilder<
//        SchedulerContract.Inputs<I, E, S>,
//        SchedulerContract.Events<I, E, S>,
//        SchedulerContract.State<I, E, S>> {
//    return this
//        .withViewModel(
//            initialState = SchedulerContract.State<I, E, S>(),
//            inputHandler = SchedulerInputHandler<I, E, S>(clock, scheduleExecutor),
//            name = "SchedulerController",
//        )
//        .apply {
//            this.inputStrategy = SchedulerFifoInputStrategy.typed()
//        }
//}
//
//@Suppress("UNCHECKED_CAST")
//public suspend fun <I : Any, E : Any, S : Any> SideJobScope<I, E, S>.scheduler(): SchedulerController<I, E, S> {
//    return getInterceptor(SchedulerInterceptor.Key)
//        .controller as SchedulerController<I, E, S>
//}
